1. Field of the Invention
The present invention relates to the field of graphical and non-graphical software controls, and more particularly to a property browser that displays and allows editing of properties of sub-objects in an Active X control.
2. Description of the Related Art
Graphical software controls or components have become commonplace in the field of user interfaces to computer programs, particularly software applications which make use of a graphical user interface (GUI). Examples of controls are list boxes, option buttons, scroll bars, check boxes, text boxes, picture boxes, command boxes, meters, gauges, charts, spread sheet displays, etc. The controls are commonly an integral part of the user interface to xe2x80x9cMicrosoft Windowsxe2x80x9d software applications, for example. The controls are used to receive user input and to display output. Additionally, controls can be created for non-user interface components such as timers, interfaces to hardware, data acquisition, and other software implementable functions.
Controls are used in a plethora of software applications. An example of an area in which software applications use controls is in the field of software controlled a instrumentation systems. It is common in the field of instrumentation systems for users to interact with instruments via software front panel interfaces rather than through hardware front panels. The instrumentation software programs commonly employ graphical controls such as switches, buttons, knobs, dials, meters, graphs, slider controls, slider indicators, etc. similar to those found on hardware front panels.
Programming systems such as xe2x80x9cVisual Basicxe2x80x9d provide an environment for software application developers to create user interfaces including controls. Typically, programming environments provide a set of standard controls. FIG. 1 is a screen shot of a Visual Basic 6.0 screen. Visual Basic 6.0 provides a toolbox of standard controls.
ActiveX Controls, also referred to as Object Linking and Embedding (OLE) Controls, are software components that conform to the Component Object Model (COM), a standard defined by xe2x80x9cMicrosoftxe2x80x9d. In many ways, ActiveX controls are similar to traditional libraries. However, since the standard is well defined, there are many applications that can use any ActiveX control simply by providing support for the ActiveX standard.
Applications or programming environments which support ActiveX controls, i.e., which may incorporate and use ActiveX controls, are commonly referred to as xe2x80x9cActiveX Control Containersxe2x80x9d or simply xe2x80x9ccontainersxe2x80x9d. Broadly speaking, a container is a software entity which xe2x80x9choldsxe2x80x9d or incorporates software components. Examples of containers are Microsoft""s xe2x80x9cExcelxe2x80x9d spreadsheet product, xe2x80x9cWordxe2x80x9d word processor, xe2x80x9cAccessxe2x80x9d database product, and Visual Basic programming environment. The ActiveX standard affords software application developers the opportunity to develop modular ActiveX controls to add into and use in their software applications.
Controls are typically objects or have some aspects of objects. Therefore, each control may have its own set of methods, events and properties. A method is a function which acts on a particular control. For example, a control may possess a xe2x80x9cmovexe2x80x9d method to move the control around on a display screen. An event is an action recognized by a control, such as clicking a mouse or pressing a key. A control has associated code which executes in response to an event recognized by the control. Properties are the control""s data (settings or attributes), such as color, shape or size. The properties of a control may be edited, i.e., changed to create the desired user interface.
Controls may have custom properties that are specific to the control. For example, a gauge may have the properties StartAngle and EndAngle describing the range in which the needle may be positioned. A button may have the properties OnColor, and OffColor for two different states. The ability to have custom properties, which the ActiveX standard provides, is generally more desirable than a standard which restricts properties on a component to a predefined set such as minimum, maximum, and color. However, this ability also presents a challenge to development systems that use the controls. Since each control may have its own unique properties, it is difficult for containers to present the custom properties of the controls to the user for configuration. This is where other attempts at control standards, such as the .VBX standard, have not been as successful as the ActiveX control standard.
Some properties of objects are themselves objects, referred to as sub-objects, which have their own properties. These properties of sub-objects may themselves be sub-objects that have their own properties, and so on.
ActiveX controls include a type library which specifies the interface of the control. The type library provides information about the components in the file (exe or dll) in which they are packaged. The type library is a compiled binary form of the idl (Interface Definition Language) file that defines the types (interfaces and controls) implemented.
FIG. 2 is a screen shot that shows an instance of a slider control which has been dragged from the toolbox and dropped onto the Form 1. The commonly used term xe2x80x9cdropxe2x80x9d is meant to encompass the placing of the control on the form, typically by clicking a mouse on the icon of the control in a toolbox, dragging the control from the toolbox to the form via the mouse and then releasing the mouse button to xe2x80x9cdropxe2x80x9d the control on the form. However, the present invention is not intended to be limited with respect to other manners of placing the control.
The slider has associated properties, which are listed in the Properties window. The developer changes the properties by selecting a property field, such as xe2x80x9cMaxxe2x80x9d (which is set to 10 in FIG. 2), and changing the value. The control reflects the change when the developer enters the change into the Properties window.
FIG. 3 is a screen shot that shows a Slider Control Properties page dialog in which the developer changes the properties of the slider. FIG. 4 shows the Max tick value property changed from 10 to 20, which is reflected in the slider now having 20 tick marks, rather than 10.
As shown in FIG. 3, a control developer may implement property pages in the control. However they may not be implemented in every control. Hence the only guaranteed way to edit the properties in a control is by using the property browser provided by the development environment. However, the property browser for ActiveX controls on present ActiveX containers in the market are unable to display properties of sub-objects of ActiveX controls.
Some environments have a property browser which can be used to view and set properties of sub-objects. However, these methods rely on examination of the source code of the component to allow this function. These methods could not work for ActiveX controls, since the source code of an ActiveX control is not available. No property browser currently exists which is able to display the sub-objects of ActiveX controls. This is because ActiveX controls typically do not expose their source code, but rather include type libraries that expose the interface of the control. Current property browsers do not access the interface description of an object in the type library and therefore cannot enumerate all the properties implemented by the object, in particular, property browsers cannot access properties of sub-objects of the object. In addition, numerous difficulties are presented in implementing such a property browser.
Hence, a system and method is desired for allowing a user to view and manipulate properties of sub-objects in a property browser for an ActiveX control.
The present invention comprises a novel system and method for enabling a property browser to display properties of sub-objects of a control, such as an ActiveX control, which utilizes a type library or other similar mechanism for specifying the interface of a control. The system and method further enables a user to manipulate properties of sub-objects of the control.
The method comprises a user dragging an icon representation of the control and dropping the control onto a form of a container which contains controls, such as ActiveX controls. When the user drops the control, the container constructs the control. Also, the method operates to read the interfaces of the type library associated with the control.
The method then determines the top level interface of the control and displays the top level properties at the top level interface in a property browser. The property browser also displays an indication of properties which are sub-objects, i.e., properties which themselves have properties. This indicator is typically a conventional plus sign which indicates further elements are available in a hierarchy tree of elements.
When the user subsequently selects a property which is a sub-object, the method operates to read the interface of the sub-object property from the type library and then display further top level properties of the interface as necessary. Thus, the system and method of the present invention operate to enable the property browser to display properties of sub-objects of a control, such as an ActiveX control, and further enables the user to manipulate these properties of sub-objects of a control.